<template>
  <footer class="footer">
    <span class="todo-count">剩余<strong>{{list.length}}</strong></span>
    <ul class="filters">
      <li>
        <a :class="{selected:change==='all'}" href="javascript:;" @click="$emit('change','all')">全部</a>
      </li>
      <li>
        <a :class="{selected:change==='no'}" href="javascript:;" @click="$emit('change','no')">未完成</a>
      </li>
      <li>
        <a :class="{selected:change==='yes'}" href="javascript:;" @click="$emit('change','yes')">已完成</a>
      </li>
    </ul>
    <button class="clear-completed" @click="del">清除已完成</button>
  </footer>
</template>

<script>
export default {
  props:{
    change:String,
    list:Array
  },
  methods:{
    del(){
      this.$emit('del')
    }
  }
}
</script>